package com.wss.day02.test05;

/**
 * @author wangshaoshuai
 * @desc TODO
 * @date 2025/4/21
 */
public class Test05 {
    public static void main(String[] args) {
        User user = new User("张三", "阜阳", "1380012");

        Goods[] goods = new Goods[3];
        goods[0] = new Goods("iPhone", 5999.0, 1, "苹果手机");
        goods[1] = new Goods("MacBook", 12999.0, 1, "苹果笔记本电脑");
        goods[2] = new Goods("AirPods", 1499.0, 2, "苹果无线耳机");

        Order order = user.placeOrder(20220001, goods);

        System.out.println("查看订单详情");
        order.showGoodsDetails();

        System.out.println("用户订单列表");

        for (Order o : user.getOrders()) {
            System.out.println("订单号：" + o.getOrderId());
        }
    }
    }

